<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.8.0" />

	<title>Class CMLUtils</title>

	<script type="text/javascript" src="resources/combined.js?2354491673"></script>
	<script type="text/javascript" src="elementlist.js?4270564774"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
		</div>



		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-CMLLanguage.html">CMLLanguage</a></li>
				<li><a href="class-CMLPost.html">CMLPost</a></li>
				<li><a href="class-CMLTranslations.html">CMLTranslations</a></li>
				<li class="active"><a href="class-CMLUtils.html">CMLUtils</a></li>
			</ul>





			<h3>Functions</h3>
			<ul>
				<li><a href="function-cml_dropdown_langs.html">cml_dropdown_langs</a></li>
				<li><a href="function-cml_get_browser_lang.html">cml_get_browser_lang</a></li>
				<li><a href="function-cml_get_menu.html">cml_get_menu</a></li>
				<li><a href="function-cml_get_notice.html">cml_get_notice</a></li>
				<li><a href="function-cml_get_the_link.html">cml_get_the_link</a></li>
				<li><a href="function-cml_is_homepage.html">cml_is_homepage</a></li>
				<li><a href="function-cml_show_flags.html">cml_show_flags</a></li>
			</ul>
		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class CMLUtils</h1>


	<div class="description">
	
<p>utility class</p>

	</div>









	<div class="info">
		
		
		
		

		<b>Located at</b> <a href="source-class-CMLUtils.html#1195-1451" title="Go to source code">api.php</a><br />
	</div>



	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="get_home_url" id="_get_home_url">

		<td class="attributes"><code>
			 public static
			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_get_home_url">#</a>
		<code><a href="source-class-CMLUtils.html#1236-1269" title="Go to source code">get_home_url</a>( <span>string <var>$slug</var> = <span class="php-keyword1">null</span> </span> )</code>

		<div class="description short">
			
<p>return home_url link in according to language slug.</p>

		</div>

		<div class="description detailed hidden">
			
<p>return home_url link in according to language slug.</p>

<p>This function format home_url in according to $slug parameter</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$slug</var></dt>
					<dd><code>string</code><br>$slug - language slug. If null current slug will be used</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>string</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="home_url" id="_home_url">

		<td class="attributes"><code>
			 public static
			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_home_url">#</a>
		<code><a href="source-class-CMLUtils.html#1298-1326" title="Go to source code">home_url</a>( )</code>

		<div class="description short">
			
<p>get "clean" home_url.</p>

		</div>

		<div class="description detailed hidden">
			
<p>get "clean" home_url.</p>

<p>The plugin translate home url in according to current language. So if you
call the wp function "home_url" it will home url with language information, in
according to url modification mode.</p>

<p>This function will return "real" home without any language information.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>string</code><br />
				</div>


				<h4>Example</h4>
				<div class="list">
						home_url()<br />
<a href="http://www.example.com/it">www.example.com/it</a><br />
<br />
CMLUtils::home_url()<br />
<a href="http://www.example.com">www.example.com</a><br />
<br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="get_clean_url" id="_get_clean_url">

		<td class="attributes"><code>
			 public static
			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_get_clean_url">#</a>
		<code><a href="source-class-CMLUtils.html#1394-1409" title="Go to source code">get_clean_url</a>( )</code>

		<div class="description short">
			
<p>return current url withouth any language information.</p>

		</div>

		<div class="description detailed hidden">
			
<p>return current url withouth any language information.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>string</code><br />
				</div>


				<h4>Example</h4>
				<div class="list">
						<a href="http://www.example.com/en/example">www.example.com/en/example</a><br />
<br />
CMLUtils::get_clean_url() will return:<br />
<br />
<a href="http://www.example.com/example">www.example.com/example</a><br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="get_clean_request" id="_get_clean_request">

		<td class="attributes"><code>
			 public static
			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_get_clean_request">#</a>
		<code><a href="source-class-CMLUtils.html#1411-1418" title="Go to source code">get_clean_request</a>( )</code>

		<div class="description short">
			
<p>get $_SERVER[ 'REQUEST_URI' ] with no language information.</p>

		</div>

		<div class="description detailed hidden">
			
<p>get $_SERVER[ 'REQUEST_URI' ] with no language information.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>string</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	</table>


















</div>

	<div id="footer">
		 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
	</div>
</div>
</div>
</body>
</html>
